home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / communic / pcmail / main / slave.ins < prev    next >
Encoding:
Text File  |  1994-06-05  |  5.3 KB  |  131 lines

  1. @(#) SLAVE.ins 2.1 90/01/22 13:01:12
  2.  
  3. This document describes how to install an MS-DOS pc-mail user in an
  4. environment where the user's mail directories are mounted from a UNIX
  5. file server, and where PC/NFS is used for file access.  It is assumed
  6. that the UNIX host uses sendmail for message routing.  You will have to
  7. adapt the examples if you are using different mechanisms for remote file
  8. access or message routing.
  9.  
  10. THE UNIX SIDE
  11.  
  12. The installation of daemon programs on the file server is documented
  13. with the source of the pc-mail and pc-maild programs (these are provided
  14. in the `daemon' subdirectory.  The following text assumes that the
  15. daemon programs have already been installed.
  16.  
  17. Add the user to the password data base.  In the pc-mail spool area on
  18. the server, create a subdirectory for the pc-mail user.  The directory
  19. must be owned by that user; for reasons of privacy, mode 0700 is
  20. recommended.  In the following example, replace username by the actual
  21. login name of the user, and the name of the spool area by its actual
  22. name.
  23.  
  24.     # mkdir /var/spool/pc-mail/username
  25.     # chown username /var/spool/pc-mail/username
  26.     # chmod 700 /var/spool/pc-mail/username
  27.  
  28. The next step is to inform the UNIX mailer of how to deliver mail for
  29. this user. This is described in the documentation of the pc-mail
  30. and pc-maild programs.
  31.  
  32. After the list of pc-mail users has been updated, kill the sendmail
  33. daemon and restart it.
  34.  
  35. Note that the sendmail program ON THE NFS SERVER will not read the
  36. user's .forward file.  The file will still be useful, however, if the
  37. user's home directory is exported to OTHER hosts running sendmail.  In
  38. that case you will want to create a .forward file in the user's home
  39. directory containing
  40.  
  41.     username@fully-qualified-hostname-of-the-mail-server
  42.  
  43. The same effect can be achieved with an alias in a network-wide alias
  44. data base.
  45.  
  46. THE PC SIDE
  47.  
  48. Copy the appropriate makefile.whatever file to makefile and edit it.
  49. Make sure that the DAEMON macro is defined, and that the large memory
  50. model is selected.  You may also use the SLAVE.bat file if no decent
  51. make utility is available.
  52.  
  53. Typing `make' should produce the following programs:
  54.  
  55.     mail, the user interface program
  56.     cmail, checks for new mail
  57.     nmail, extracts sender and subject from new mail
  58.     smail, performs alias expansion and queues outgoing messages
  59.  
  60. Create a dedicated directory on the file server to install the mail
  61. binaries.
  62.  
  63. On the PC, adjust the AUTOEXEC.BAT, NETWORK.BAT or DRIVES.BAT files so
  64. that the following commands are executed upon startup (replace `server'
  65. by the name of the NFS server host, and replace `username' by the login
  66. name of the actual user):
  67.  
  68.     net name username *
  69.     net use m: \\server\var\spool\pc-mail\username
  70.     set MAILDIR=m:\
  71.  
  72. The trailing \ in the last command is needed, or the mail program will
  73. complain that it "cannot access some essential data files".
  74.  
  75. Other environment variables that need to be set are:
  76.  
  77.     PATH, should include the location of the pc-mail binaries
  78.     EDITOR, the editor command to be used; if this is a batch
  79.     file, the `.bat' suffix should be included.
  80.  
  81. It is advisable to specify absolute path names, including drive names.
  82.  
  83. Optional environment variables are:
  84.  
  85.     MAILPRN, destination of printed output
  86.     MAILCMD, command to be executed upon exit from the mail program.
  87.     At our site, MAILPRN is the name of a file, and MAILCMD is
  88.     the command that sends that file to a postscript printer. If 
  89.     this is a batch file, the `.bat' suffix should be included.
  90.  
  91. Reboot the pc.
  92.  
  93. Test the mail programs by creating a small mail message addressed to
  94. yourself.  Since the message will automatically be picked up by the
  95. pc-maild daemon program on the server, the message may arrive before you
  96. had a chance to type a DIR command!
  97.  
  98. ALIAS DATABASE
  99.  
  100. The user can define aliases for (groups of) mail addresses.  The alias
  101. data base is a text file with on each line:
  102.  
  103.     alias replacement_part
  104.  
  105. The alias should be a single word; words are separated by blanks, tabs
  106. or commas.  The replacement part may be one or more words.  Whenever the
  107. smail (mail spooler) program recognizes an alias, it is replaced by the
  108. `replacement part'.  Aliases may be defined in terms of other aliases;
  109. the order in which they appear in the alias data base is not important
  110. (except when an alias is defined more than once; the program remembers
  111. only the last definition of an alias).  The alias expansion software is
  112. smart enough to detect infinite loops and to suppress multiple
  113. occurrances of the same recipient.  Alias substitution is not case
  114. sensitive.
  115.  
  116. BATCH-MODE OPERATION
  117.  
  118. The cmail program can be run from a batch file (say, each time the PC is
  119. turned on), to report if there is new mail.  Also, you may want to
  120. auto-execute the cmail command when exiting from the interactive mail
  121. shell (using the MAILCMD environment variable described above).
  122.  
  123. TEMPLATE FILES
  124.  
  125. The user can provide message templates with standard header and trailer
  126. lines.  If the file "header" is present in the mail directory, its
  127. contents will be included at the beginning of every mail message created
  128. by the user.  Similarly, the contents of a file "trailer" will be
  129. included at the end of mail messages.  The "header" and "trailer" files
  130. should be ordinary text files.
  131.